package com.guigu.xiaowenbo.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.guigu.tankai.mapper.DfileMapper;
import com.guigu.tankai.pojo.Dfile;
import com.guigu.util.PageVo;
import com.guigu.xiaowenbo.service.DfilerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DfilerServiceImpl implements DfilerService {
    @Autowired(required = false)
    DfileMapper dfileMapperl;

    public PageVo selectByPrimaryKeyXWB(Integer num,Integer size){
        PageHelper.startPage(num,size);
        List<Dfile> list = dfileMapperl.selectByPrimaryKeyXWB();
        PageInfo pageInfo = new PageInfo(list);
        PageVo pageVo = new PageVo();
        pageVo.setRows(pageInfo.getList());
        pageVo.setTotal(pageInfo.getTotal());
        return pageVo;
    }
    public Dfile selectByPrimaryKeyid(String productid){
        return dfileMapperl.selectByPrimaryKeyid(productid);
    }

    public int udtpr(Integer id){
     return dfileMapperl.udtpr(id);
    }

}
